package com.zis.thread;

import com.zis.wechat.api.inter.IWechatInter;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * Create by wangshen 2018/1/11
 */
public class JSticketThread {


    private boolean isRun = true;

    private int time = 7000;

    public JSticketThread (final IWechatInter wechatInter, final RedisTemplate redisTemplate) {

        new Thread(){
            @Override
            public void run() {
                String accountId = "326764658868490240";//写死
                while (isRun) {
                    try {
                        String ticket = wechatInter.JsApiToken(accountId);
                        if (ticket != null) {
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        }.start();
    }
}
